new Vue({
    el:'#main',
    data:()=>({
        requestUrl:'',
        requestType:'list',
        page:1,
        pageSize:10,
        pageSum:0,
        list:[],
        startProcessData_:[],
        startProcessData:{
            proInfo:{},
            storeInfo:[],
            itemData:[],
            packer:[],
            listRemark:[],
        },
        pickupTableData:{},    // 开始处理弹框 需要提货数据
        detail_id:[],
        priority:0,
        processCheckData:[],
        newListCheckbox:[],
        processPickupData:{
            processQty:0,
            proInfo:{},
            storeInfo:[]
        },
        pauseData:{
            processQty:0,
            proInfo:{},
            storeInfo:[],
            itemData:[],
            saleData:[],
            itemStoreSum:0
        },
        processFinishData:{
            proInfo:{},
            storeInfo:[],
            itemData:[],
        },
        pickupProcessData:{
            proInfo:{},
            storeInfo:[],
        },
        isdisabled:false,
        auth_ids:$('#adminauth_ids').text(),
        navPromptNum:{
            listNum:0,
            processNum:0,
            pauseNum:0,
            finishNum:0,
            cancelNum:0,
            pickupNum:0,
        }

    }),
    methods:{
        formatUnit:formatUnit,
        getdata(){
            $('.loding').show()
            $('.alert').hide()
            this.pageSum = 0
            var data={
                requestType:this.requestType,
                page:this.page,
                pageSize:this.pageSize,
            }
            $.ajax({
                url:this.requestUrl,
                type:'post',
                data,
                success:(data)=>{
                    data = JSON.parse(data)
                    this.list = data.data.list
                    this.pageSum = data.data.pageSum
                    if(data.data.pageSum){
                        this.Resetnav(this.page,data.data.pageSum)
                    }
                    this.navPageNum()
                    $('.loding').hide()
                }
            })
        },
        Resetnav(pageCurrent, pageSum) {
            //数据总条数
            var myPageCount = pageSum;
            //一页显示多少条
            var myPageSize = this.pageSize;
            //总页数
            var countindex = myPageCount % myPageSize > 0 ? (myPageCount / myPageSize) + 1 : (myPageCount / myPageSize);
            $.jqPaginator('#pagination', {
                totalPages: parseInt(countindex),
                //最多显示多少页
                visiblePages: 5,
                //默认显示第几页
                currentPage: pageCurrent,
                first: '<li class="first"><a href="javascript:;">'+langcon.page_home+'</a></li>',
                prev: '<li class="prev"><a href="javascript:;"><i class="arrow arrow2"></i>'+langcon.previous_page+'</a></li>',
                next: '<li class="next"><a href="javascript:;">'+langcon.next_page+'<i class="arrow arrow3"></i></a></li>',
                last: '<li class="last"><a href="javascript:;">'+langcon.last_page+'</a></li>',
                page: '<li class="page"><a href="javascript:;">{{page}}</a></li>',
                all:'<li class="page"><a href="javascript:;">'+myPageCount+' / '+this.page+'PG , '+this.pageSize+' /PG</a></li>',
                onPageChange:(num, type)=>{
                    if (type == "change") {
                        this.page=num
                        this.getdata()
                    }
                }
            });
        },
        newListCheckbox_select(){
            var prochar_id = 0
            var priority = []
            var data = $("input[name='newListCheckbox']:checked")
            $("input[name='newListCheckbox']:checked").each(function(i){
                priority.push(Number($(this).attr('priority')))
                if(i == 0) {
                    prochar_id = $(this).attr('prochar_id')
                }else{
                    var is_false = false
                    var msg = ''
                    if($(this).attr('prochar_id') != prochar_id){
                        is_false = true
                        msg = '所选择得处理数据是不同产品'
                    } 
                    if(Math.max.apply(null, priority) - Math.min.apply(null, priority) > 3){
                        is_false = true
                        msg = '所选择得处理数据级别超过3级'
                    } 
                    if(is_false){
                        change_mes_type("#mainalert .alert",2)
                        $('#mainalert .alert').show()
                        $('#mainalert .alert p').html('*'+msg+'<br>')
                        // 取消选中
                        $(this).attr('checked',false);
                        return false
                    }else{
                        $('#mainalert .alert').hide()
                    }
                }

            });
        },
        doubleProcess(){
            var data = $("input[name='newListCheckbox']:checked")

            if(data.length <= 0){
                var pointData = {
                    status:2,
                    msg:'请选择需要处理的数据',
                }
                this.point(pointData,'#mainalert',2);
                return false
            }

            var detailtKey = []
            var detail_id = []
            var qtySum = 0
            var listIndex = [];
            var detailIndex = [];
            var priority = 0;
            $("input[name='newListCheckbox']:checked").each(function(i){
                qtySum += Number($(this).attr('qty'))
                listIndex.push(Number($(this).attr('listIndex')))
                detailIndex.push(Number($(this).attr('detailIndex')))
                detailtKey.push(Number($(this).val()))
                detail_id.push($(this).attr('detail_id'))
                if(priority < $(this).attr('priority')) priority == $(this).attr('priority')
            });


            this.startProcessData_ = []
            for (var i = 0; i < listIndex.length; i++) {
                this.startProcessData_.push({
                    sale_id:this.list[listIndex[i]].sale_id,
                    qty:this.list[listIndex[i]].detail[i].qty,
                    remark:this.list[listIndex[i]].detail[i].remark,
                    checker_name:this.list[listIndex[i]].detail[i].checker_name,
                })
            }

            this.startProcessData = this.list[listIndex[0]].detail[detailIndex[0]]
            this.startProcessData.qty = qtySum
            this.detail_id = detail_id
            this.priority = priority
            var requestData = {
                pro_id:this.startProcessData.proInfo.pro_id,
                prochar_id:this.startProcessData.proInfo.prochar_id,
                warehouse_id:this.startProcessData.sale_make.warehouse_id,
                requestType:'get'
            }
            this.getStartProcess(requestData,'get')
            $('#inputProcessNum').val(this.startProcessData.qty)
            

            $('#process_startModal').modal('toggle')
        },
        //  save
        //
        //
        // 新订单 -- 开始处理button
        startProcess(listData,detailData,detailIndex,type='save'){
            if(type == 'double'){
                this.doubleProcess()
                return false
            }

            if(type == 'get'){
                this.startProcessData_ = []
                this.startProcessData_.push({
                    sale_id:listData.sale_id,
                    qty:detailData.qty,
                    remark:detailData.remark,
                    checker_name:detailData.checker_name,
                })
                console.log(detailData.detail_id)
                this.startProcessData = detailData
                this.detail_id.push(detailData.detail_id)
                this.priority = detailData.priority
                var requestData = {
                    pro_id:this.startProcessData.proInfo.pro_id,
                    prochar_id:this.startProcessData.proInfo.prochar_id,
                    warehouse_id:this.startProcessData.sale_make.warehouse_id,
                    requestType:type
                }
                this.getStartProcess(requestData,type)
                $('#inputProcessNum').val(this.startProcessData.qty)
            }else{
                if(this.pickupTableData != undefined && this.pickupTableData.store2area_id == 0){
                    var pointData = {
                        status:2,
                        msg:'请选择提货目的地',
                    }
                    this.point(pointData,'#process_startModal',2);
                    return false
                }

                // 包装员
                var packer = this.getPacker()
                // 配件提货
                var pickupItemData = this.getPickupItemData()

                var requestData = {
                    startProcessData:this.startProcessData,
                    qty:$('#inputProcessNum').val(),    // 加工数量
                    pickupData:this.pickupTableData,
                    packer:packer,
                    pickupItemData,
                    requestType:type,
                    detail_id:this.detail_id
                }
                this.getStartProcess(requestData,type)
            }
        },
        // 获取选中的员工
        getPacker(){
            $('#process_startModal .alert').hide()
            if($("input[name='packer']:checked").length > 0){
                var packer_ids = ''
                $("input[name='packer']:checked").each(function(i){//把所有被选中的复选框的值存入数组
                    if(packer_ids == ''){
                        packer_ids += $(this).val()
                    }else{
                        packer_ids += ','+$(this).val()
                    }
                });
                return packer_ids
            }else{
                var pointData = {
                    status:2,
                    msg:'选择指定员工',
                }
                this.point(pointData,'#process_startModal',2);
                return false
            }
            
        },
        getPickupItemData(){
            var data = this.startProcessData.itemData
            var pickupItemData = [];
            $(data).each(function(i,value){//把所有被选中的复选框的值存入数组
                if(value.pickupNum > 0){
                    pickupItemData.push({
                        pro_id:value.pro_id2item,
                        prochar_id:value.prochar_id2item,
                        qty:value.pickupNum,
                    })
                }
            });
            return pickupItemData
        },
        getStartProcess(data,type){
            // console.log(data)
            this.isdisabled = true
            $.ajax({
                url:'/admin/salepacker/startProcess',
                type:'post',
                data,
                async: false,
                success:(data)=>{
                    data = JSON.parse(data)
                    if(type == 'get'){
                        this.startProcessData.itemData = data['item']
                        this.startProcessData.packer = data['packer']
                    }else{
                        this.point(data,'#process_startModal')
                        if(data.status == 1){
                            this.isdisabled = false
                            this.getdata()
                            this.point(data,'#mainalert',2)
                        } 
                    }
                }
            })
        },
        calculationStore2areaSum(data){
            console.log(data)
            var sum = 0
            for (var i = 0; i < data.length; i++) {
                sum += Number(data[i]['qty'])
            }
            return sum
        },
        getStore(processQty,requestData){
            var storeQty = 0
            var data = {
                pro_id:requestData.pro_id,
                prochar_id:requestData.prochar_id,
                requestType:'getStore'
            }
            $.ajax({
                url:'/admin/salepacker/startProcess',
                type:'post',
                data,
                async: false,
                success:(data)=>{
                    storeQty = data
                }
            })
            var dataQty = processQty + processQty*0.2
            if( $('#inputProcessNum').val() > dataQty &&  dataQty  < storeQty){
                $('#inputProcessNum').val(dataQty)
            }else if( $('#inputProcessNum').val() > dataQty &&  dataQty  > storeQty){
                $('#inputProcessNum').val(storeQty)
            }
        },
        inputProcessNum(data,aa){
            // 设置需要处理input 上限值
            this.getStore(data.qty,data.proInfo)

            // 是否需要获取提货的目的地
            var is_show = false
            this.pickupTableData = {}
            var storeSum = this.calculationStore2areaSum(data.storeInfo)
            if($('#inputProcessNum').val() > storeSum){
                // 组装开始处理弹框，需要提货的数据
                this.pickupTableData = {
                    title:'产品',
                    pro_id:this.startProcessData.proInfo.pro_id,
                    prochar_id:this.startProcessData.proInfo.prochar_id,
                    storeSum:storeSum,
                    pickupQty:$('#inputProcessNum').val(),
                    destination:this.startProcessData.storeInfo,
                    store2area_id:0,
                    priority:this.priority+2,
                }
                is_show = true
            }


            // 配件提货
            if(this.startProcessData.itemData.length > 0){
                for (var i = 0; i < this.startProcessData.itemData.length; i++) {
                    var itemStoreSum = 0
                    if(this.startProcessData.itemData[i].storeInfo.length > 0){
                        for (var j = 0; j < this.startProcessData.itemData[i].storeInfo.length; j++) {
                            itemStoreSum += this.startProcessData.itemData[i].storeInfo[j].qty
                        }
                    }
                    this.startProcessData.itemData[i].pickupNum = 0
                    if(0 < itemStoreSum &&  itemStoreSum < $('#inputProcessNum').val()){
                        this.startProcessData.itemData[i].pickupNum += (Number($('#inputProcessNum').val())*this.startProcessData.itemData[i].qty-itemStoreSum)
                    }
                }
            }

        },
        // itemPickupNum
        itemPickupNumIsShow(){
            if($("input[name='pickupcheckbox']:checked").length > 0){
                $('.itemPickupNum').show()
            }else{
                $('.itemPickupNum').hide()
            }
        },
        getPause(listIndex,detailData,type='listPause'){
            var storeInfoQtySum = this.calculationStore2areaSum(detailData.storeInfo)
            var warehouse_id = type == 'processPause' ? detailData.warehouse_id : detailData.sale_make.warehouse_id
            this.pauseData = {
                proInfo:detailData.proInfo,
                storeInfo:detailData.storeInfo,
                storeInfoQtySum:storeInfoQtySum,
                processQty:detailData.qty,
                process_id:this.list[listIndex].id,
                detail_id:detailData.detail_id,
                make_id:this.list[listIndex].make_id,
                warehouse_id:warehouse_id,
            }
            var data = {
                pro_id:detailData.proInfo.pro_id,
                prochar_id:detailData.proInfo.prochar_id,
                warehouse_id:warehouse_id,
                requestType:'get'
            }
            $.ajax({
                url:'/admin/salepacker/listPause',
                type:'post',
                data,
                async: false,
                success:(data)=>{
                    data = JSON.parse(data)
                    this.pauseData.itemData = data.item
                    this.pauseData.saleData = data.saleData
                }
            })
        },
        // 暂停
        listPause(listIndex,detailData,type='get')
        {   
            if(type=='get'){
                this.getPause(listIndex,detailData)
            }else{
                var data = {
                    detail_id:this.pauseData.detail_id,
                    make_id:this.pauseData.make_id,
                    warehouse_id:this.pauseData.warehouse_id,
                    remark:$('#pauseRemark').val()
                }
                return data
            }
            
        },
        // 处理中 查看button
        processCheck(listData,detailData){
            this.startProcessData_ = []
            for (var i = 0; i < listData.detail.length; i++) {
                this.startProcessData_.push({
                    sale_id:listData.detail[i].sale_id,
                    qty:listData.detail[i].qty,
                    remark:listData.detail[i].remark,
                    checker_name:listData.detail[i].checker_name,
                })
            }

            this.startProcessData = {
                proInfo:detailData.proInfo,
                storeInfo:detailData.storeInfo,
                listRemark:listData.remark,
                qtySum:listData.qtySum,

                start_name:listData.create_name,
                start_time:listData.create_time,
                pause_name:listData.pause_name,
                pause_time:listData.pause_time,
                finish_name:listData.finish_name,
                finish_time:listData.finish_time,
                cancel_name:listData.cancel_name,
                cancel_time:listData.cancel_time,
                team_nameData:listData.team_names.split(' / '),

                itemData:[],
                packer:[],
            }
            var data = {
                prochar_id:detailData.proInfo.prochar_id,
                pro_id:detailData.proInfo.pro_id,
                warehouse_id:detailData.warehouse_id,
            }

            $.ajax({
                url:'/admin/salepacker/processCheck',
                type:'post',
                data,
                async: false,
                success:(data)=>{
                    data = JSON.parse(data)
                    this.startProcessData.itemData = data['item']
                    this.startProcessData.packer = data['packer']
                }
            })
        },
        // 处理中 提货button
        processPickup(listData,detailData){
            $('#process_pickupModal .alert').hide()
            if(listData != 'save'){
                console.log(detailData)
                var storeInfoQtySum = this.calculationStore2areaSum(detailData.storeInfo)
                this.processPickupData = {
                    processQty:listData.qty,
                    proInfo:detailData.proInfo,
                    storeInfo:detailData.storeInfo,
                    storeInfoQtySum:storeInfoQtySum,
                    warehouse_id:listData.warehouse_id,
                    make_id:detailData.make_id,
                    sale_id:detailData.sale_id
                }
            }else{

                var data = {    
                    make_id:this.processPickupData.make_id,
                    sale_id:this.processPickupData.sale_id,
                    area_id:$('#processPickupArea_id').val(),
                    priority:$('#processPickupPriority').val(),
                    processQty:this.processPickupData.processQty,
                    pro_id:this.processPickupData.proInfo.pro_id,
                    warehouse_id:this.processPickupData.warehouse_id,
                    prochar_id:this.processPickupData.proInfo.prochar_id,
                    qty:$('#processPickup').val() * this.processPickupData.proInfo.prochar_qty,
                    m3:this.processPickupData.proInfo.ctn_m3/this.processPickupData.proInfo.prochar_qty,
                }

                this.isdisabled = true
                $.ajax({
                    url:'/admin/salepacker/processPickup',
                    type:'post',
                    data,
                    async: false,
                    success:(data)=>{
                        this.isdisabled = false
                        data = JSON.parse(data)
                        this.point(data,'#process_pickupModal')
                        if(data.status == 1) this.point(data,'#mainalert',2)
                    }
                })
            }
            
        },
        processPickupInput(){
            $("#processPickupQty").text(  Number($("#processPickup").val()) * this.processPickupData.proInfo.prochar_qty );
        },
        // 暂停保存
        saveProcessPause(){
            if(this.requestType == 'list'){
                console.log(1)
                var data = this.listPause('','','save')
                var url = '/admin/salepacker/listPause?requestType=save'
            }else{
                var data = this.processPause('','','save')
                var url = '/admin/salepacker/processPause'
            }
            this.isdisabled = true
            $.ajax({
                url:url,
                type:'post',
                data,
                success:(data)=>{
                    this.isdisabled = false
                    data = JSON.parse(data)
                    this.point(data,'#process_pauseModal')
                    if(data.status == 1) this.point(data,'#mainalert',2)
                }
            })
        },
        // 处理中 暂停
        processPause(listIndex,detailData,type='get'){
            if(type == 'get'){
                this.getPause(listIndex,detailData,'processPause')
            }else{
                var data = {
                    process_id:this.pauseData.process_id,
                    make_id:this.pauseData.make_id,
                    warehouse_id:this.pauseData.warehouse_id,
                    remark:$('#pauseRemark').val()
                }
                return data
            }
            
        },
        // 处理中 完成
        processFinish(listIndex,detailData,type='get'){
            if(type == 'get'){
                this.getProcessFinish(listIndex,detailData)
            }else{
                var proStore2area = []
                $("input[name='processFinishchecked']:checked").each(function(i){
                    proStore2area.push({
                        id:$(this).attr('store2area_id'),
                        area_id:$(this).attr('area_id'),
                        qty:$(this).attr('qty')
                    })
                });
                

                var itemData = []
                var itemStore2area = []
                for (var i = 0; i < this.processFinishData.itemData.length; i++) {

                    if(this.processFinishData.itemData[i].storeInfo.length > 0){
                        var checkboxname = 'processFinishItemchecked_'+i
                        $("input[name="+checkboxname+"]:checked").each(function(j){
                            itemStore2area.push({
                                id:$(this).attr('store2area_id'),
                                area_id:$(this).attr('area_id'),
                                qty:$(this).attr('qty')
                            })
                        });
                        itemData[i] = {
                            pro_id:this.processFinishData.itemData[i].pro_id2item,
                            prochar_id:this.processFinishData.itemData[i].prochar_id2item,
                            qty:this.processFinishData.itemData[i].qty,
                            itemStore2area:itemStore2area
                        }    
                    }
                }
                console.log(this.processFinishData)
                var data = {
                    prochar_m3:this.processFinishData.proInfo.ctn_m3/this.processFinishData.proInfo.prochar_qty,
                    processQty:this.processFinishData.processQty,
                    pro_id:this.processFinishData.proInfo.pro_id,
                    prochar_id:this.processFinishData.proInfo.prochar_id,
                    processDetailQty:this.processFinishData.qtySum,
                    warehouse_id:this.processFinishData.warehouse_id,
                    process_id:this.processFinishData.process_id,
                    itemData:itemData,
                    proStore2area:proStore2area,
                    // processFinishStore2area_id:$("#processFinishStore2area_id").val(),
                    finishSaveQty:$('#finishSaveQty').val(),
                    processFinishStore2area_id:$('#finishSaveQty').val() > 0 ? this.processFinishData.storeInfo[$("#processFinishStore2area_id").val()].store2area_id : 0,
                    processFinishArea_id:$('#finishSaveQty').val() > 0 ? this.processFinishData.storeInfo[$("#processFinishStore2area_id").val()].id : 0,
                    // processFinishArea_id::$("#processFinishStore2area_id").attr('area_id')
                    // processFinishArea_id::$("#processFinishStore2area_id").attr('area_id')
                }
                console.log(data)
                this.isdisabled = true
                $.ajax({
                    url:'/admin/salepacker/processFinish?requestType=save',
                    type:'post',
                    data,
                    success:(data)=>{
                        data = JSON.parse(data)
                        this.point(data,'#process_finishModal')
                        if(data.status == 1){
                            this.isdisabled = false
                            this.point(data,'#mainalert',2)
                            this.getdata()
                        } 
                    }
                })
            }
            
        },
        getProcessFinish(listIndex,detailData){
            var okSum = this.calculationStore2areaSum(detailData.storeInfo)
            this.processFinishData = {
                proInfo:detailData.proInfo,
                storeInfo:detailData.storeInfo,
                qtySum:this.list[listIndex].qtySum,
                team_names:this.list[listIndex].team_names,
                processQty:this.list[listIndex].qty,
                warehouse_id:detailData.warehouse_id,
                process_id:detailData.process_id,
                okSum:okSum,
            }

            var data = {
                pro_id:detailData.proInfo.pro_id,
                prochar_id:detailData.proInfo.prochar_id,
                warehouse_id:detailData.warehouse_id,
                requestType:'get'
            }
            $.ajax({
                url:'/admin/salepacker/processFinish',
                type:'post',
                data,
                async: false,
                success:(data)=>{
                    data = JSON.parse(data)
                    this.processFinishData.itemData = data.item
                }
            })

            this.startProcessData_ = []
            for (var i = 0; i < this.list[listIndex].detail.length; i++) {
                this.startProcessData_.push({
                    sale_id:this.list[listIndex].detail[i].sale_id,
                    qty:this.list[listIndex].detail[i].qty,
                    remark:this.list[listIndex].detail[i].remark,
                    checker_name:this.list[listIndex].detail[i].checker_name,
                })
            }
        },
        // 提货，取消
        pickupCancel(pickupId){
            this.isdisabled = true
            $.ajax({
                url:'/admin/salepacker/pickupCancel',
                type:'post',
                data:{pickupId:pickupId},
                async: false,
                success:(data)=>{
                    this.isdisabled = false
                    data = JSON.parse(data)
                    this.point(data,'#mainalert','2')
                    if(data.status == 1){
                        this.getdata()
                    }
                }
            })
        },
        // 提货，收到
        pickupProcess(type='view',listData){
            console.log(listData)
            if(type == 'view'){
                this.pickupProcessData = listData
            }else{
                var data = {
                    qty:this.pickupProcessData.qty,
                    pro_id:this.pickupProcessData.pro_id,
                    area_id:this.pickupProcessData.area_id,
                    pickupDetail_id:this.pickupProcessData.id,
                    prochar_id:this.pickupProcessData.prochar_id,
                    warehouse_id:this.pickupProcessData.warehouse_id,
                    m3:this.pickupProcessData.proInfo.ctn_m3/this.pickupProcessData.proInfo.prochar_qty,
                }
                this.isdisabled = true
                $.ajax({
                    url:'/admin/salepacker/pickupProcess',
                    type:'post',
                    data,
                    async: false,
                    success:(data)=>{
                        this.isdisabled = false
                        data = JSON.parse(data)
                        this.point(data,'#pickup_receivedModal')
                        if(data.status == 1){
                            this.point(data,'#mainalert','2')
                            this.getdata()
                        }
                    }
                })
            }
        },
        // 已完成 取消完成
        finishCancel(process_id,prochar_qty,ctn_m3){
            this.isdisabled = true
            $.ajax({
                url:'/admin/salepacker/finishCancel',
                type:'post',
                data:{process_id:process_id,m3:ctn_m3/prochar_qty},
                success:(data)=>{
                    this.isdisabled = false
                    data = JSON.parse(data)
                    this.point(data,'#mainalert','2')
                    if(data.status == 1){
                        this.getdata()
                    }
                }
            })
        },
        // 只显示自己的工作
        myWork(){
            this.requestUrl = "/admin/salepacker/list?request=requestAjax&myWork=1";
            this.getdata()
        },
        clickGetList(requestType){
            this.requestType = requestType
            this.list = []
            this.getdata()
        },
        //设置popper组件的配置
        setpopper(e){
            $(e.target).popover({
                trigger: 'hover focus manual',
                placement: ($(e.target).attr("placement") == undefined) ? 'left' : $(e.target).attr("placement"),
                //placement:'left',
                title: $(e.target).attr("title"),
                html: 'true',
                content: $(e.target).find(".content").html(),
                animation: false
            });
        },
        point(data,modelId,type=1){
            change_mes_type(modelId+' .alert',data.status)
            if(data.status == 1){
                if(type == 1){
                    $(modelId).modal('toggle')
                }
                $(modelId+' .alert').show()
                $(modelId+' .alert p').html('*'+data.msg+'<br>')
            }else{
                $(modelId+' .alert').show()
                $(modelId+' .alert p').html('*'+data.msg+'<br>')
            }
        },
        navPageNum(){
            $.ajax({
                url:'/admin/salepacker/getNavPageNum',
                type:'get',
                success:(data)=>{
                    data = JSON.parse(data)
                    this.navPromptNum = data
                    console.log(this.navPromptNum)
                }
            })
        },
    },
    mounted(){
        this.requestUrl = "/admin/salepacker/list?request=requestAjax";
        this.getdata()
    }
})